package com.ek.distmpl.dao.mapper;

import com.ek.distmpl.dao.model.Scheorder;
import com.ek.distmpl.dao.model.ScheorderExample;
import java.util.List;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.DeleteProvider;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.InsertProvider;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Result;
import org.apache.ibatis.annotations.Results;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.SelectProvider;
import org.apache.ibatis.annotations.Update;
import org.apache.ibatis.annotations.UpdateProvider;
import org.apache.ibatis.type.JdbcType;

public interface ScheorderMapper {
    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table scheorder
     *
     * @mbg.generated Fri Mar 29 15:10:48 CST 2019
     */
    @SelectProvider(type=ScheorderSqlProvider.class, method="countByExample")
    long countByExample(ScheorderExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table scheorder
     *
     * @mbg.generated Fri Mar 29 15:10:48 CST 2019
     */
    @DeleteProvider(type=ScheorderSqlProvider.class, method="deleteByExample")
    int deleteByExample(ScheorderExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table scheorder
     *
     * @mbg.generated Fri Mar 29 15:10:48 CST 2019
     */
    @Delete({
        "delete from scheorder",
        "where sche_order_oid = #{scheOrderOid,jdbcType=CHAR}"
    })
    int deleteByPrimaryKey(String scheOrderOid);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table scheorder
     *
     * @mbg.generated Fri Mar 29 15:10:48 CST 2019
     */
    @Insert({
        "insert into scheorder (sche_order_oid, sche_order_sid, ",
        "order_total_num, order_total_money, ",
        "order_create_time, order_pay_time, ",
        "sche_order_status)",
        "values (#{scheOrderOid,jdbcType=CHAR}, #{scheOrderSid,jdbcType=CHAR}, ",
        "#{orderTotalNum,jdbcType=INTEGER}, #{orderTotalMoney,jdbcType=DOUBLE}, ",
        "#{orderCreateTime,jdbcType=VARCHAR}, #{orderPayTime,jdbcType=VARCHAR}, ",
        "#{scheOrderStatus,jdbcType=INTEGER})"
    })
    int insert(Scheorder record);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table scheorder
     *
     * @mbg.generated Fri Mar 29 15:10:48 CST 2019
     */
    @InsertProvider(type=ScheorderSqlProvider.class, method="insertSelective")
    int insertSelective(Scheorder record);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table scheorder
     *
     * @mbg.generated Fri Mar 29 15:10:48 CST 2019
     */
    @SelectProvider(type=ScheorderSqlProvider.class, method="selectByExample")
    @Results({
        @Result(column="sche_order_oid", property="scheOrderOid", jdbcType=JdbcType.CHAR, id=true),
        @Result(column="sche_order_sid", property="scheOrderSid", jdbcType=JdbcType.CHAR),
        @Result(column="order_total_num", property="orderTotalNum", jdbcType=JdbcType.INTEGER),
        @Result(column="order_total_money", property="orderTotalMoney", jdbcType=JdbcType.DOUBLE),
        @Result(column="order_create_time", property="orderCreateTime", jdbcType=JdbcType.VARCHAR),
        @Result(column="order_pay_time", property="orderPayTime", jdbcType=JdbcType.VARCHAR),
        @Result(column="sche_order_status", property="scheOrderStatus", jdbcType=JdbcType.INTEGER)
    })
    List<Scheorder> selectByExample(ScheorderExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table scheorder
     *
     * @mbg.generated Fri Mar 29 15:10:48 CST 2019
     */
    @Select({
        "select",
        "sche_order_oid, sche_order_sid, order_total_num, order_total_money, order_create_time, ",
        "order_pay_time, sche_order_status",
        "from scheorder",
        "where sche_order_oid = #{scheOrderOid,jdbcType=CHAR}"
    })
    @Results({
        @Result(column="sche_order_oid", property="scheOrderOid", jdbcType=JdbcType.CHAR, id=true),
        @Result(column="sche_order_sid", property="scheOrderSid", jdbcType=JdbcType.CHAR),
        @Result(column="order_total_num", property="orderTotalNum", jdbcType=JdbcType.INTEGER),
        @Result(column="order_total_money", property="orderTotalMoney", jdbcType=JdbcType.DOUBLE),
        @Result(column="order_create_time", property="orderCreateTime", jdbcType=JdbcType.VARCHAR),
        @Result(column="order_pay_time", property="orderPayTime", jdbcType=JdbcType.VARCHAR),
        @Result(column="sche_order_status", property="scheOrderStatus", jdbcType=JdbcType.INTEGER)
    })
    Scheorder selectByPrimaryKey(String scheOrderOid);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table scheorder
     *
     * @mbg.generated Fri Mar 29 15:10:48 CST 2019
     */
    @UpdateProvider(type=ScheorderSqlProvider.class, method="updateByExampleSelective")
    int updateByExampleSelective(@Param("record") Scheorder record, @Param("example") ScheorderExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table scheorder
     *
     * @mbg.generated Fri Mar 29 15:10:48 CST 2019
     */
    @UpdateProvider(type=ScheorderSqlProvider.class, method="updateByExample")
    int updateByExample(@Param("record") Scheorder record, @Param("example") ScheorderExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table scheorder
     *
     * @mbg.generated Fri Mar 29 15:10:48 CST 2019
     */
    @UpdateProvider(type=ScheorderSqlProvider.class, method="updateByPrimaryKeySelective")
    int updateByPrimaryKeySelective(Scheorder record);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table scheorder
     *
     * @mbg.generated Fri Mar 29 15:10:48 CST 2019
     */
    @Update({
        "update scheorder",
        "set sche_order_sid = #{scheOrderSid,jdbcType=CHAR},",
          "order_total_num = #{orderTotalNum,jdbcType=INTEGER},",
          "order_total_money = #{orderTotalMoney,jdbcType=DOUBLE},",
          "order_create_time = #{orderCreateTime,jdbcType=VARCHAR},",
          "order_pay_time = #{orderPayTime,jdbcType=VARCHAR},",
          "sche_order_status = #{scheOrderStatus,jdbcType=INTEGER}",
        "where sche_order_oid = #{scheOrderOid,jdbcType=CHAR}"
    })
    int updateByPrimaryKey(Scheorder record);
}